package com.zhaowb.springcloud.common.msg;

/**
 * Created with IDEA
 *
 * @author zhaowb
 * @date 2018/10/22 20:48
 */
public class ListRestResponse<T> {
    private boolean rel;
    private String msg;
    private T result;
    private int count;
    private String callback;

    public boolean isRel() {
        return rel;
    }

    public void setRel(boolean rel) {
        this.rel = rel;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getCallback() {
        return callback;
    }

    public void setCallback(String callback) {
        this.callback = callback;
    }

    public ListRestResponse<T> count(int count) {
        this.setCount(count);
        return this;
    }

    public ListRestResponse<T> count(Long count) {
        this.setCount(count.intValue());
        return this;
    }

    public ListRestResponse<T> rel(boolean rel) {
        this.setRel(rel);
        return this;
    }

    public ListRestResponse<T> msg(String msg) {
        this.setMsg(msg);
        return this;
    }

    public ListRestResponse<T> result(T result) {
        this.setResult(result);
        return this;
    }
}
